<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qevent.cpp -->
  <title>QPlatformSurfaceEvent Class | Qt GUI 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QPlatformSurfaceEvent</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QPlatformSurfaceEvent Class</h1>
<!-- $$$QPlatformSurfaceEvent-brief -->
<p>The QPlatformSurfaceEvent class is used to notify about native platform surface events. <a href="#details">More...</a></p>
<!-- @@@QPlatformSurfaceEvent -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QPlatformSurfaceEvent&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.5</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qevent.html">QEvent</a></td></tr></table></div><p>This class was introduced in Qt 5.5.</p>
<ul>
<li><a href="qplatformsurfaceevent-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qplatformsurfaceevent.html#SurfaceEventType-enum">SurfaceEventType</a></b> { SurfaceCreated, SurfaceAboutToBeDestroyed }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qplatformsurfaceevent.html#QPlatformSurfaceEvent">QPlatformSurfaceEvent</a></b>(QPlatformSurfaceEvent::SurfaceEventType <i>surfaceEventType</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPlatformSurfaceEvent::SurfaceEventType </td><td class="memItemRight bottomAlign"><b><a href="qplatformsurfaceevent.html#surfaceEventType">surfaceEventType</a></b>() const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QPlatformSurfaceEvent-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>Platform window events are synchronously sent to windows and offscreen surfaces when their underlying native surfaces are created or are about to be destroyed.</p>
<p>Applications can respond to these events to know when the underlying platform surface exists.</p>
</div>
<!-- @@@QPlatformSurfaceEvent -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SurfaceEventType$$$SurfaceCreated$$$SurfaceAboutToBeDestroyed -->
<h3 class="fn" id="SurfaceEventType-enum"><a name="SurfaceEventType-enum"></a>enum QPlatformSurfaceEvent::<span class="name">SurfaceEventType</span></h3>
<p>This enum describes the type of platform surface event. The possible types are:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QPlatformSurfaceEvent::SurfaceCreated</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The underlying native surface has been created</td></tr>
<tr><td class="topAlign"><code>QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The underlying native surface will be destroyed immediately after this event</td></tr>
</table></div>
<p>The <code>SurfaceAboutToBeDestroyed</code> event type is useful as a means of stopping rendering to a platform window before it is destroyed.</p>
<!-- @@@SurfaceEventType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QPlatformSurfaceEvent[overload1]$$$QPlatformSurfaceEventQPlatformSurfaceEvent::SurfaceEventType -->
<h3 class="fn" id="QPlatformSurfaceEvent"><a name="QPlatformSurfaceEvent"></a>QPlatformSurfaceEvent::<span class="name">QPlatformSurfaceEvent</span>(<span class="type"><a href="qplatformsurfaceevent.html#SurfaceEventType-enum">QPlatformSurfaceEvent::SurfaceEventType</a></span> <i>surfaceEventType</i>)</h3>
<p>Constructs a platform surface event for the given <i>surfaceEventType</i>.</p>
<!-- @@@QPlatformSurfaceEvent -->
<!-- $$$surfaceEventType[overload1]$$$surfaceEventType -->
<h3 class="fn" id="surfaceEventType"><a name="surfaceEventType"></a><span class="type"><a href="qplatformsurfaceevent.html#SurfaceEventType-enum">QPlatformSurfaceEvent::SurfaceEventType</a></span> QPlatformSurfaceEvent::<span class="name">surfaceEventType</span>() const</h3>
<p>Returns the specific type of platform surface event.</p>
<!-- @@@surfaceEventType -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
